home *** CD-ROM | disk | FTP | other *** search
/ HyperLib 1997 Winter - Disc 1 / HYPERLIB-1997-Winter-CD1.ISO.7z / HYPERLIB-1997-Winter-CD1.ISO / オンラインウェア / UTIL / Cron 1.0a7.sit / Cron Distribution / Documentation / Cron Commands < prev    next >
Text File  |  1996-05-27  |  13KB  |  365 lines

  1.  
  2. cron commands
  3. Version 1.0a7 of 26-May-96
  4. Chris W. Johnson
  5.  
  6.  
  7.  
  8. In addition to launching applications, AppleScript applets, desk accessories, documents, etc. at predetermined times, Cron can also launch a special type of application called (for lack of a better name) a メcron command.モ (Catchy, huh?) The unique thing about a Cron command is that it can accept arguments supplied along with the command in the crontab file which condition the way in which the command will behave. (Note that AppleScripts can be written to do the same thing. See the note in the メAppleScript Appletsモ subsection of the メREAD MEモ file for a link to details.)
  9.  
  10. Be aware that some commands included with past versions of cron arenユt included with this version, usually because they seemed hopelessly obsolete, pointless, or both. If a command on which you depended is missing from this distribution, you can just keep a copy of it around and use it with this new version of Cron. Also, please send me email to let me know that it was useful to you, and Iユll consider updating that command and including it in a future release.
  11.  
  12.  
  13. Command Name:           Description:
  14. ____________________    __________________________________________________________
  15.  
  16. activity-report         Ask user what he or she is doing.
  17. beep                    Generate one or more beeps.
  18. "cron fader"            Screen saver.
  19. digest                  Generate MD4 digest.
  20. echo                    Display an alert.
  21. "midnight sky fader"    Screen saver.
  22. modem                   Dial a modem.
  23. mountafp                Mount an AppleShare (AFP) volume.
  24. OpenURL                 Open the Internet document (or whatever) referenced by a URL.
  25. quit                    Quit an application.
  26. rexec                   Issue an rexec command to a remote host.
  27. shutdown                Shutdown/restart the Macintosh.
  28. sound                   Play a sound file.
  29. "tcp time client"       Get correct time from TCP-based Time server.
  30. "udp time client"       Get correct time from UDP-based Time server.
  31. unmount                 Unmount (eject) a volume (disk).
  32. uupc                    Run the UUPC program.
  33.  
  34.  
  35.  
  36.  
  37. Activity Report
  38. ______________________________
  39.  
  40. Activity Report brings up a window on your screen into which you can type up to 255 characters of text. The text is recorded in a log file, along with the time and date at which each item of text was recorded. This can be helpful if youユre trying to track the use of your time.
  41.  
  42. Usage:
  43.  
  44.         activity-report [-t dialogTimeOut] [-l activityLogFile] [-p promptString] [-w windowTitle]
  45.             
  46. Options: 
  47.  
  48.     -t   Change prompt dialog timeout from default of 60 seconds, to the supplied number of seconds.
  49.                 
  50.     -l   Use the following name for the log file, instead of the default ("Activity Log.txt").
  51.                 
  52.     -p   Use the following string as the prompt in the activity dialog.
  53.                 
  54.     -w   Use the following string as the window title for the activity dialog.
  55.  
  56. Examples:
  57.  
  58.         activity-report
  59.         activity-report -t 90 -l "My Activity Log" -p "What's up doc?" -w "Nobody Expects the Spanish Inquisition"
  60.  
  61.  
  62.  
  63. Beep
  64. ______________________________
  65.  
  66. Beep simply causes the Mac emit the standard system beep once, or as many times as specified.
  67.  
  68. Usage:
  69.  
  70.         beep [BeepCount]
  71.  
  72. Examples:
  73.  
  74.         beep
  75.         beep 3
  76.  
  77.  
  78.  
  79. Cron Fader
  80. ______________________________
  81.  
  82. When used with the idlescreen extension to the crontab file format, Cron Fader allows Cron to work like a screen saver. In this case, the cron icon will jump randomly around all available screens, periodically spelling out the name メcronモ. It will quit as soon as the mouse is moved, or a key is pressed.
  83.  
  84. Usage:
  85.  
  86.         "cron fader"
  87.  
  88. Examples:
  89.  
  90.         "cron fader"
  91.  
  92.  
  93.  
  94. Digest
  95. ______________________________
  96.  
  97. Generate MD4 digests of the specified files and record them in the メdigest log.txtモ file located in the same folder as the digest command. Any number of target files can be specified in place of TargetPathName in the example below. (Of course, itユs easiest to supply aliases to the files, instead of actual path names.)
  98.  
  99. Based on MD4 source written by Ronald L. Rivest, ゥ1990 RSA Data Security, Inc.
  100.  
  101. Usage:
  102.  
  103.         digest <TargetPathNames>...
  104.             
  105. Example:
  106.  
  107.         digest "Finder alias" "System alias" Cron
  108.  
  109.  
  110.  
  111. Echo
  112. ______________________________
  113.  
  114. Echo displays its arguments in Notification Manager alert windows. Those alerts automatically dismiss themselves after 60 seconds, unless the -t option is used to supply a longer or shorter delay period.
  115.  
  116. This command was originally contributed by Mike Pearce.
  117.  
  118. Usage:
  119.  
  120.          echo [-t timeout] <args>...
  121.             
  122. Options:
  123.  
  124.     -t   Alert automatically goes away after the timeout interval (in seconds) has elapsed.
  125.  
  126. Examples:
  127.  
  128.         echo "Time to go home and feed the dog."
  129.         echo -t 240 "The meeting starts soon, better leave now."
  130.         echo "Here's one message." "Here's another, separate message."      
  131.  
  132.  
  133.  
  134. Midnight Sky Fader
  135. ______________________________
  136.  
  137. When used with the idlescreen extension to the crontab file format, Midnight Sky Fader allows Cron to work like a screen saver. In this case, various scenes composed of clouds and stars are rendered in great detail as if you were staring up into an ever changing night sky. It will quit as soon as the mouse is moved, or a key is pressed.
  138.  
  139. Note: Midnight Sky Fader requires at least a 68020 processor (Power PC preferred), System 7 and lots of RAM. Itユs designed for rendering in 24-bit color (thatユs the メMillionsモ color mode), but it will dither down to any lesser bit depth. The introductory screen will look terrible if you donユt have the Palatino TrueType font installed.
  140.  
  141. Usage:
  142.  
  143.         "midnight sky fader"
  144.  
  145. Examples:
  146.  
  147.         "midnight sky fader"
  148.  
  149.  
  150.  
  151. Modem
  152. ______________________________
  153.  
  154. The Modem command opens the modem port and writes a string to it. I sometimes use this command to have my office computer place wake-up calls to me at home. Whether itユs useful for anything else, I have no idea.
  155.  
  156. Usage:
  157.  
  158.         modem [-p] String
  159.             
  160. Options:
  161.  
  162.     -p   Use the printer port instead of the modem port.
  163.  
  164. Examples:
  165.     
  166.         modem "atdt 110-9123"
  167.         modem -p "atdt 110-9123"
  168.  
  169.  
  170.  
  171. MountAFP
  172. ______________________________
  173.  
  174. MountAFP logs-into and mounts AppleShare (AFP) volumes. The volume is specified by VolName on the file server name ServerName in the ZoneName zone. Log-in is performed with the UserName username and UserPassword password.
  175.  
  176. Usage:
  177.  
  178.         mountafp ZoneName ServerName VolName UserName UserPassword
  179.  
  180. Examples:
  181.  
  182.         mountafp "Building 102" "UT Microservices" Staff chrisj squidbrain
  183.  
  184.  
  185.  
  186. OpenURL
  187. ______________________________
  188.  
  189. OpenURL uses Internet Config to open an appropriate Internet helper application (Anarchie, Fetch, Netscape, Explorer, etc.) and load the supplied URL(s). This is handy for having Cron open your favorite Internet publication and have it waiting for you when you arrive at the office.
  190.  
  191. Usage:
  192.  
  193.         openurl <URL>...
  194.  
  195. Examples:
  196.  
  197.         openurl "http://zcias4.ziff.com/~macweek/"
  198.  
  199.  
  200.  
  201. Quit
  202. ______________________________
  203.  
  204. The Quit command asks a running application to quit. The application may be specified by its name or its unique four letter creator code (AKA application signature, or autograph). Describing the methods for find application creator codes is beyond the scope of this document, so stick with application names if you arenユt already familiar with creator codes.
  205.  
  206. Usage:
  207.  
  208.         quit [-c applicationCreatorCode] | [-n applicationName] 
  209.             
  210. Options:
  211.  
  212.     -c   Use the following four letter creator code to identify the application that should be terminated.
  213.                 
  214.     -n   Use the following name to identify the application that should be terminated.
  215.  
  216. Examples:
  217.  
  218.         quit "Eudora"
  219.         quit CSOm
  220.  
  221.  
  222.  
  223. RExec
  224. ______________________________
  225.  
  226. RExec uses the UNIX rexec scheme to execute a command on a remote host (typically a UNIX host). The remote host is specified by HostName, your user name and password for the host should be specified in the UserName and Password arguments, and followed by an argument containing the command you want the remote host to execute.
  227.  
  228. Note: MacTCP is required, of course.
  229.  
  230. Usage:
  231.  
  232.         rexec HostName UserName Password Command
  233.  
  234.  
  235.  
  236. Shutdown
  237. ______________________________
  238.  
  239. Shutdown quits all running applications and either restarts or shuts-down the Macintosh. It may do this interactively, such that a user working at the Mac at the time can cancel the shutdown, and it may optionally delete the desktop files on all mounted volumes in order to force them to be rebuilt when the computer starts-up again.
  240.  
  241. Note: When the desktop files are deleted, all the "Get Info" comments are lost for all files, even when running System 7.5.3 or better.
  242.  
  243. Note: Running applications that do not support AppleEvents will delay shutdown, since the OS will not kill them until the Quit event sent to them has timed-out. This can easily take a minute or two. Eventually, however, all processes will be killed and the restart/shutdown will take place. Fortunately, such applications are increasingly rare.
  244.  
  245. Usage:
  246.  
  247.         shutdown [-rd] DelaySeconds [-i PromptString]
  248.  
  249. Options:
  250.  
  251.     -r   Restart the computer, instead of shutting it down.
  252.                 
  253.     -d   Delete desktop files on all mounted volumes. This forces them to be rebuilt the next 
  254.          time the volumes are mounted.
  255.             
  256.     -i   Shutdown interactively -- display a shutdown alert. PromptString should be specified 
  257.          when this option is used.
  258.  
  259. Examples:
  260.  
  261.         shutdown -ird 240 "Please prepare for nightly system restart..."
  262.         shutdown -i 60 "This Mac is about to turn itself off for the night."
  263.         shutdown 10
  264.  
  265.  
  266.  
  267. Sound
  268. ______________________________
  269.  
  270. Sound plays the 'snd ' resources specified by the SoundNames arguments. Sound will look for the 'snd ' resources in either the System file or in sound files of the same names. Any number of sound names may be specified -- each one will be played once and in the listed order.
  271.  
  272. Note: Sound may not work if it does not have enough memory in order to load the specified sound resource.  Adjusting the Sound commandユs memory allocation will fix this.
  273.  
  274. Usage:
  275.  
  276.         sound SoundNames
  277.  
  278. Examples:
  279.  
  280.         sound "Wild Eep" Sosumi Droplet
  281.         sound Quack
  282.  
  283.  
  284.  
  285. TCP Time Client
  286. ______________________________
  287.  
  288. Connect to the specified RFC 868 time server using TCP, get the time from it, and reset the Mac's time and date accordingly. Any number of time servers may be specified; each will be tried in turn until the time is successfully retrieved from one of them. Typically, you'll want to specify your local time server first, then one or two backup servers which should be tried if your local server is unavailable for some reason.
  289.  
  290. Note: This is a TCP-based implementation of the "Time Protocol" defined in RFC 868 of May 1983 (available via FTP from nis.nsf.net). While most time servers support both TCP and UDP based queries, there are exceptions. ULTRIX, for example, seems to be distributed with its support for TCP-based queries present, but disabled. Consequently, this command is useful with most, but not all, time servers.
  291.  
  292. Note: MacTCP is required (of course), and the Map control panel must be set to the correct local time zone for this command to do its job properly.
  293.  
  294. Usage:
  295.  
  296.         "tcp time client" [-d] ServerName [BackupServerNames]
  297.            
  298. Options:
  299.  
  300.     -d   Automatically adjust for Daylight Savings Time (DST). Use this option if you live in an  
  301.          area of the USA that observes the DST convention.
  302.  
  303. Examples:
  304.  
  305.         "tcp time client" -d ntp1.utexas.edu ntp2.utexas.edu
  306.  
  307.  
  308.  
  309. UDP Time Client
  310. ______________________________
  311.  
  312. Connect to the specified RFC 868 time server using UDP, get the time from it, and reset the Mac's time and date accordingly. Any number of time servers may be specified; each will be tried in turn until the time is successfully retrieved from one of them. Typically, you'll want to specify your local time server first, then one or two backup servers which should be tried if your local server is unavailable for some reason.
  313.  
  314. Note: MacTCP is required (of course), and the Map control panel must be set to the correct local time zone for this command to do its job properly.
  315.  
  316. Usage:
  317.  
  318.         "udp time client" [-d] ServerName [BackupServerNames]
  319.            
  320. Options:
  321.  
  322.     -d   Automatically adjust for Daylight Savings Time (DST). Use this option if you live in an  
  323.          area of the USA that observes the DST convention.
  324.  
  325. Examples:
  326.  
  327.         "tcp time client" -d ntp1.utexas.edu ntp2.utexas.edu
  328.  
  329.  
  330.  
  331. Unmount
  332. ______________________________
  333.  
  334. Unmount the volumes specified by VolumeName and all subsequent arguments. Volume names need not include a trailing colon.
  335.  
  336. Usage:
  337.  
  338.         unmount VolumeName
  339.  
  340. Example:
  341.  
  342.         unmount Staff
  343.         unmount "Virginia's Hard Disk"
  344.  
  345.  
  346.  
  347. UUPC
  348. ______________________________
  349.  
  350. The UUPC command instructs UUPC 3.0 to connect to the systems specified by SystemName and all subsequent parameters.
  351.  
  352. Usage:
  353.  
  354.         uupc [-n applicationName] [-b] SystemName
  355.  
  356. Options:
  357.  
  358.     -q   Quit UUPC when the calls are complete.
  359.  
  360.     -n   Use the following name to identify the application that should be used to 
  361.          connect to the specified systems.
  362.  
  363.     -b   Launch UUPC in the background, instead of the foreground.
  364.  
  365.